-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user provided contributions flows all the way to the generated code #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I just have a couple of questions, see below.
dp_creator_ii/tests/test_template.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file for the PR look good, but I wanted to ask about test_fill_values() - can there be more assertions here, for the other lines in the context_block? Also in test_make_script(), the test is checking that the python script runs without error, but it doesn't check the contents of the script. Even though you are testing the other functions individually, it could be good to test that the final script has the correct contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For test_fill_values
, I was thinking of it as a unit test of the template filling, so I think the best resolution is to make it simpler, so it only does that.
I will make test_make_script
stronger, since it is more of an integration test. Thanks!
Oh: applying black to the script fixture made it diverge from what we actually output. fixing... |
There is still work to do in this area, so I've filed a couple follow-up issues, but I think this much makes sense for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments are addressed, approving
contributions
, a number, fromprivacy_unit
, an particular OpenDP object.ui_helpers.py
for UI code that should be reused. (For now, putting the code sample under a<details>
tag is easy, but if we want to change it in the future, we should do it in one place.)